<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查询流程实例</title>
<script type="text/javascript">

		/* 查看流程图 */
		var seeprocess=function(piId){
			
			document.getElementById("diagram").src="seeProcessDiagram.action?piId="+piId;
		}
</script>

</head>
<body>
	<center><h2>查询流程实例</h2></center><hr/>
	<table border="1" align="center" width="80%">
		<tr>
			<th>流程实例ID</th>
			<th>流程实例ID</th>
			<th>流程定义ID</th>
			<th>活动的节点</th>
			<th>部署ID</th>
			<th>流程定义名称</th>
			<th colspan="3">操作</th>
		</tr>
		
		<c:forEach items="${piLists}" var="i">
			<tr>
			<td>${i.id}</td>
			<td>${i.processInstanceId}</td>
			<td>${i.processDefinitionId}</td>
			<td>${i.activityId}</td>
			<td>${i.deploymentId}</td>
			<td>${i.processDefinitionName}</td>
			<td colspan="1"><a href="javascript:;" onclick="seeprocess(${i.id})">查看流程图</a></td>
			<td colspan="1"><a href="singleProcessInstance.action?pdId=${i.processDefinitionId}&piId=${i.id}" >走一步</a></td>
			<td colspan="1"><a href="deleteProcessInstance.action?pdId=${i.processDefinitionId}&piId=${i.id}" >删除流程实例</a></td>
			<td colspan="1"><a href="queryTask.action?piId=${i.id}" >查看任务</a></td>
		</tr>
		
		</c:forEach>
	
	</table>
	
	<img id="diagram"/>
	
</body>
</html>